import { Tooltip } from "antd";
import { useTableContext } from "../../hooks/useTableContext";
import Icon from "@/components/Icon";
// import { useI18n } from '@/hooks/web/useI18n'

export default function RedoSetting() {
	const table = useTableContext();
	// const { t } = useI18n()

	function redo() {
		table.reload();
	}

	return (
		<Tooltip placement="top" title={<span>Refresh</span>}>
			<div onClick={redo} className="cursor-pointer">
				{/* Icon无法触发点击，故增加外层div */}
				<Icon icon="ant-design:redo-outlined" />
			</div>
		</Tooltip>
	);
}
